1. Field of the Invention
This invention relates generally to techniques for managing electronic systems, and relates more particularly to a system and method for implementing a flexible interrupt mechanism.
2. Description of the Background Art
Implementing flexible methods for managing electronic systems is a significant consideration for designers and manufacturers of contemporary electronic devices. However, effectively managing electronic systems may create substantial challenges for system designers. For example, enhanced demands for increased device functionality and performance may require more system processing power and require additional hardware resources. An increase in processing or hardware requirements may also result in a corresponding detrimental economic impact due to increased production costs and operational inefficiencies.
Furthermore, enhanced device capability to perform various advanced system operations may provide additional benefits to a system user, but may also place increased demands on the control and management of various device components. For example, an enhanced electronic device that processes digital image data may benefit from an effective implementation because of the large amount and complexity of the digital data involved. In addition, in certain contemporary environments, the occurrence of various internal and external events may sometimes require one or more interruptions of current systems processes in order to perform other system tasks.
Due to growing demands on system performance and substantially increasing data magnitudes, it is apparent that developing new techniques for managing electronic systems is a matter of concern for related electronic technologies. Therefore, for all the foregoing reasons, developing flexible techniques for managing electronic systems remains a significant consideration for designers, manufacturers, and users of contemporary electronic devices.
In accordance with the present invention, an apparatus and method are disclosed for effectively implementing a flexible interrupt mechanism in an electronic system. In one embodiment, initially, a central processing unit (CPU) or another appropriate entity may preferably initiate an interrupt configuration procedure by programming an interrupt source field of a configuration register to thereby identify a particular interrupt source from a plurality of internal and external interrupt sources in the electronic system.
Next, the CPU or another appropriate entity may preferably program a trigger-type field of the configuration register to select a particular trigger type for the foregoing interrupt source of the electronic system. The trigger type may preferably include, but is not limited to, a low-level trigger, a high-level trigger, a negative-edge trigger, or a positive-edge trigger. An interrupt module or another appropriate entity may then preferably copy the trigger-type field from the configuration register into a corresponding location in internal or external trigger-type registers that correspond to respective internal or external interrupt sources in the electronic system.
The CPU or another appropriate entity may also preferably program a CPU-line field in the configuration register to select a particular CPU line for providing the interrupt from the corresponding interrupt source to the CPU. The interrupt module or another appropriate entity may then preferably copy the CPU-line field from the configuration register into a corresponding location in internal or external CPU-line registers that correspond to respective internal or external interrupt sources in the electronic system.
The foregoing interrupt configuration process may preferably repeat until all interrupts for all interrupt sources in the electronic system have been configured. In addition, certain of the foregoing steps may readily be performed in a concurrent manner. The CPU may then preferably install all appropriate interrupt handlers that correspond to the interrupt sources of the electronic system for servicing interrupts from the interrupt sources.
Subsequently, a particular interrupt source in the electronic system may preferably transmit an interrupt to an interrupt module of a bridge device in the electronic system. A trigger module of the interrupt module may preferably detect the interrupt transmitted from the interrupt source by utilizing a trigger type designated in the foregoing trigger-type registers.
Next, an interrupt controller of the interrupt module may preferably program a status register to thereby indicate detecting the interrupt from the interrupt source. The interrupt module may then preferably determine whether the electronic system has been enabled for servicing the particular interrupt received from the interrupt source. In certain embodiments, the interrupt module may preferably reference an enable register to determine whether the interrupt has been enabled. If the interrupt from the interrupt source has been enabled, then the interrupt module may preferably select an appropriate CPU line that may be designated in the foregoing CPU-line register. The interrupt controller may then preferably route the interrupt to the CPU over the designated CPU line.
The CPU may next preferably read an appropriate location in the status register to thereby identify the particular interrupt source corresponding to the received interrupt. Then, the CPU may preferably utilize an appropriate corresponding interrupt handler to service the interrupt from the interrupt source. Finally, the CPU may preferably clear the serviced interrupt using a clear register which may also reset the corresponding location in the status register to indicate that the interrupt has been successfully serviced. The present invention thus provides an improved system and method for implementing a flexible interrupt mechanism in an electronic system.